home *** CD-ROM | disk | FTP | other *** search
- BBSPPP v1.00 - PPP loader for DOS-based BBS's under OS/2 Warp.
- By Chip Morrow - cmorrow@iobbs.netwalk.com
- Shareware: $10
- My address is:
-
- Chip Morrow
- 290 Colony Park Drive
- Pickerington, OH 43147
- email: cmorrow@iobbs.netwalk.com
-
- BBSPPP is not crippled in any way. It will function (or not function,
- depending on your viewpoint) identically whether you register it or not.
- By registering, you're supporting my efforts, and you'll be notified
- (and perhaps even automatically sent) updates as I get them finished.
-
- I wrote this program for my own use. I'm releasing this program as a
- feeler to see if anyone else has a similar setup and can use it. On
- the surface it seems like a logical thing for DOS-based BBS sysops to
- try, but this is new for me. :)
-
- My system is setup as follows:
-
- My provider Dialup caller
- (7) (150, default routed to .154)
- | |
- +-----+--COM1--------COM2
- | OS2 | (154) (150 NOT default routed)
- |(154)|
- | |
- +-----+
-
- Some setup info:
-
- I have two IP addresses from my service provider. The first one is
- used for my net connection itself, on COM1. This connection is
- on my end xxx.xxx.xxx.154. This connects to my service provider at
- xxx.xxx.xxx.7. The second is what I let my dialup users into, as
- xxx.xxx.xxx.150. My service provider routes .150 straight to .154
- and lets my system deal with whatever comes in destined for .150.
- So the end result is:
-
- .154 -> .7 (my connection to the net, default routed to .7)
- .154 -> .150 (my dialup callers, not default routed)
-
- On my service provider's end, they had to route .150 to .154, which
- makes my OS/2 go through the gyrations of:
-
- 7 -> 154 -> 150 when something comes in for 150, and:
- 150 -> 154 -> 7 when something from 150 goes out to the net.
-
- I originally used OS/2's "Dial Other Providers" program to make my
- connection to the net, which worked fine, but did not redial when the
- connection dropped, requiring manual intervention on my part to get
- the connection back up when it dropped. Then, at the advice of a
- couple of people in the newsgroups, I located a program named
- "PPPFAKE.EXE" on hobbes that took the place of PPP.EXE temporarily.
- Last I checked, it had a filename of PPPFK101.ZIP or some such in
- the os2/network/tcpip directory.
-
- This program set up a .CMD file with the exact paramaters that
- "Dial Other Providers" was sending to PPP.EXE. This let me create
- a .CMD file that auto-redialed when the connection dropped, to the
- effect of:
-
- :GO
- ppp [parms]
- goto GO
-
- At that point, the connection now restarted itself when it dropped,
- and it was time to move on to trying to get my BBS dialup to do PPP
- connections.
-
- To do this, it was basically a matter of mapping out what I needed
- to do. I determined it was like this:
-
- - A DOS fidonet mailer is answering the phone.
- - A BBS caller hooks up.
- - Somewhere between when the DOS mailer "exited to the BBS", and
- the BBS itself loaded, I wanted to direct the caller to either
- a PPP login or the BBS itself.
-
- In that way, PPP users could do a scripted login to a PPP session
- right from the standard BBS dialup.
-
- That's where this program comes in.
-
- BBSPPP is a "shim" between your DOS Fidonet mailer and either your
- BBS or a PPP session.
-
- BBSPPP is for just about any Fidonet Sysop of a DOS-based BBS under
- OS/2 Warp, who has the following special requirements:
-
- - Has a frontend mailer such as Binkley-Term for DOS answering
- the phone.
-
- - Has a dedicated link to the Internet, via a 28.8K PPP, ISDN,
- or whatever else.
-
- - Needs to direct callers after they connect, to either the BBS
- or a PPP session.
-
- - Uses a fossil driver for communications.
-
- BBSPPP expects the caller to already be connected when it loads. It also
- requires a fossil driver. It *CAN* be run in local mode for testing
- purposes from your local keyboard, if need be... just don't specify the
- node number on the command line.
-
- Usage is otherwise:
-
- BBSPPP x
-
- Where x is the node number.
-
- BBSPPP uses the following text files, that must be configured for your
- system:
-
- BBSPPPx.CFG - Node-specific configuration file, or just BBSPPP.CFG
- if BBSPPPx.CFG doesn't exist. This is pretty self-
- explanitory, but has the format of:
-
- COMx (COM port of the BBS caller)
- 57600 BAUD,N,8,1 (Port rate and parms you're locked at)
-
- BBSPPP.TXT - Pre-login screen, after your mailer's display
- BBSPPP.BBS - Text sent to the caller after they head to the BBS
- BBSPPP.UP - Text sent to the caller after a successful PPP login,
- before the PPP connection actually fires up.
- LOGIN.CFG - The file containing the usernames and passwords that
- are allowed to do a PPP login.
-
- LOGIN.CFG has the following format:
-
- 2
- user1, password1
- user2, thisisuser2'spassword
-
- The first line in the file is the number of users configured.
- The second and subsequent lines are the usernames and passwords.
- The first parameter is the username that will be specified at the
- "Login: " prompt, and the second is the password that will be
- specified at the "Password: " prompt. The password entered will
- not be echoed back to the user.
-
- This leads to the next obvious question... how do you actually start
- a PPP session once the caller has logged on successfully and yet
- still return control to your mailer when finished?
-
- The answer lies in yet another program that I found on hobbes, by
- the name of "HSTART". The filename is/was "hstart03.zip" in the
- os2/textutil directory there. This magical program lets you fire
- up an OS/2 program from a DOS session... absolutely required for a
- program like this one.
-
- Here's the short answer... I run Binkley-Term for DOS, which would
- otherwise load my RBBS-PC DOS bulletin board when a BBS caller
- connected. In the section where my BBS would normally load, I now
- have these lines in my mailer's batch file:
-
- :GETRBBS
- CLS
- vfos_del
- c: <--
- cd\bbsppp <--
- bbsppp 1 <--
- if errorlevel 2 goto start <--
- if errorlevel 1 goto pppstart <--
- d:
- cd\binkley
- BBSBATCH
- GOTO START
-
- Notice the lines marked with "<--". At this point in my mailer batch
- file, my mailer has noticed that a BBS caller has connected. It then
- drops down to this "GETRBBS" line, where it would normally load the
- BBS. But now, it stops and asks the caller whether they want a BBS
- or a PPP session, via this BBSPPP program that you're looking at and
- evaluating.
-
- My mailer batch file changes to the directory where BBSPPP is located,
- and runs "bbsppp 1", meaning that it's loading "BBSPPP.EXE", with the
- caller coming in on node #1. BBSPPP then goes through it's motions,
- and exits with an errorlevel. Those errorlevels are *KEY* to doing
- the rest, and they are:
-
- Errorlevel 2: Invalid PPP login. Caller has selected that they
- want a PPP login, and then has entered an invalid
- Login/Password combo three times. BBSPPP drops
- carrier, waits 10 seconds, and then exits with
- errorlevel 2.
- Errorlevel 1: Successful PPP login. Caller has entered a valid
- login ID and password, and BBSPPP exits with
- errorlevel 1.
- Errorlevel 0: Caller wants the BBS. BBSPPP exits with errorlevel 0.
-
- In the case of Errorlevel 0, the mailer batch file goes on about it's
- business as if nothing ever happened, and loads the BBS.
-
- In the case of errorlevel 2, the mailer batch file branches back up and
- restarts, just as if the caller had dropped carrier while logging on.
-
- But in the case of errorlevel 1, the caller has successfully done a
- PPP login. At this point, the mailer batch file drops down to this
- section:
-
- :pppstart
- c:
- cd\hstart
- pppstart.bat
-
- This changes directories appropriately, and runs this batch file:
-
- hstart /win /wait cd\hstart& pppstart.cmd
- d:
- cd\binkley
- binkley
-
- This runs the hstart program (from hobbes) to bring up an OS/2 session
- from a DOS session. Hstart begins the OS/2 session from the root
- directory of the drive letter the system boots from, so I have it
- change to the "hstart" directory, and then run the OS/2 command
- "pppstart.cmd" from there.
-
- /win means I want to start a windowed OS/2 session.
- /wait means that this pppstart.bat file will now wait forever for a
- signal from OS/2 to say it's ok to resume.
-
- Now here's the PPPSTART.CMD file that this process fires up:
-
- PPP com2 38400 mru 1500 rtscts 205.156.197.154:205.156.197.150
- netmask 255.255.255.0 modem reneg priority 1 idle 15 exit
- hwait
- exit
-
- That first line is the PPP command line that you'll use to start the
- PPP session for the remote caller. It's wrapped here for display
- purposes... the second line above beginning with "netmask" is part
- of the first line.
-
- "hwait" is a program that comes included om "hstart03.zip" from hobbes.
- This sends a signal back to the calling DOS session (with the /wait
- command line) to say "I'm done now", and let your calling batch file
- go on about it's business of reloading your Fidonet mailer as if a
- caller had logged off.
-
- And really... that's about all there is to it.
-
- Again, programs you'll need from hobbes to accomplish this:
-
- hstart03.zip (start an OS/2 session from a DOS session)
- pppfk101.zip (create a .CMD file from your working "Dial Other
- Providers" program that you're using with your
- service provider, to redial your net connection
- when it drops). Not essential, but helpful.
-
- That's it.
-
- Enjoy.
-
- Send 10 bucks when it works for you. :)
-
- Chip Morrow
- 290 Colony Park Drive
- Pickerington, OH 43147
- cmorrow@iobbs.netwalk.com
-